package com.kuaiyin.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kuaiyin.dto.JMeterTestDTO;
import com.kuaiyin.entity.JmeterTest;
import com.kuaiyin.utils.PageResult;
import com.kuaiyin.vo.JMeterTestVO;
import jakarta.validation.Valid;

import java.util.List;
import java.util.Map;
import java.util.function.Consumer;

/**
 * <p>
 * JMeter测试配置表 服务类
 * </p>
 *
 * @author ng
 * @since 2025-06-23
 */
public interface IJmeterTestService extends IService<JmeterTest> {

    void saveJmeterTest(@Valid JMeterTestDTO jmeterTestDTO);

    void updateJmeterTest(Long id, JMeterTestDTO jmeterTestDTO);

    JMeterTestVO getById(Long id);

    PageResult<JMeterTestVO> getJmeterTest(Integer page, Integer size, Consumer<LambdaQueryWrapper<JmeterTest>> condition);

    List<JMeterTestVO> getJmeterTestList();

    void removeById(Long id);

    void runJmeterTest(Long id) throws Exception;

    Map<String, String> getReport(Long id);

    void stopTestPlan(Long id);
}
